{extend name="base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/mmgrid/mmGrid.css?v={$v}" />
{/block}
{block name="js"}
<script src="__ADMIN__/js/wstgridtree.js?v={$v}" type="text/javascript"></script>
<script src="__ADMIN__/homemenus/homemenus.js?v={$v}" type="text/javascript"></script>
{/block}
{block name="main"}
<style>.mmGrid{border-bottom:0px;}</style>
<div id='alertTips' class='alert alert-success alert-tips fade in'>
  <div id='headTip' class='head'><i class='fa fa-lightbulb-o'></i>操作说明</div>
  <ul class='body'>
    <li>本功能为开发者功能，主要用于设置电脑版买家和卖家菜单，普通使用者请勿随意修改，以免影响系统使用。</li>
  </ul>
</div>
<div class="wst-toolbar">
   <select id='s_menuType' onchange='loadGrid()'>
      <option value='-1'>菜单类型</option>
      <option value='0'>用户菜单</option>
      <option value='1'>商家菜单</option>
   </select>
   {if WSTGrant('QTCD_01')}
   <button class="btn btn-success f-right" onclick="javascript:toEdit(0,0)"><i class='fa fa-plus'></i>新增</button>
   {/if}
   <div style="clear:both"></div>
</div>
<div class='wst-grid'>
<div class='mmGrid layui-form' id="maingrid"></div>
</div>
<div id='menuBox' style='display:none'>
    <form id='menuForm'>
    <table class='wst-form wst-box-top'>
       <tr>
          <th>菜单名称<font color='red'>*</font>：</th>
          <td>
              <input type="text" id="menuName" name="menuName" class="ipt" maxLength='20' />
          </td>
       </tr>
       <tr>
          <th>菜单Url<font color='red'>*</font>：</th>
          <td>
              <input type="text" id="menuUrl" name="menuUrl" class="ipt" maxLength='200' style='width:300px'/>
          </td>
       </tr>
       <tr>
          <th>附加资源：</th>
          <td>
              <textarea id="menuOtherUrl" name="menuOtherUrl" class="ipt" style='width:80%'></textarea>
          </td>
       </tr>

       <tr id="menuTypes">
          <th>菜单类型<font color='red'>*</font>：</th>
            <td>
        <select id="menuType" class="ipt">
          <option value="0">用户菜单</option>
          <option value="1">商家菜单</option>
        </select>
            </td>
        </tr>

       <tr>
          <th>菜单排序<font color='red'>*</font>：</th>
          <td>
              <input type="text" id="menuSort" name="menuSort" class="ipt" maxLength='20' />
          </td>
       </tr>
       <tr>
          <th>是否显示<font color='red'>  </font>：</th>
          <td class="layui-form">
            <input type="checkbox" id="isShow" name="isShow" value="1" class="ipt" lay-skin="switch" lay-filter="isShow1" lay-text="显示|隐藏">
          </td>
       </tr>
    </table>
    </form>
</div>
{/block}
